diff -Nur dsniff-2.4-old/mailsnarf.c dsniff-2.4/mailsnarf.c
--- dsniff-2.4-old/mailsnarf.c	2009-09-15 00:11:17.159202783 +0300
+++ dsniff-2.4/mailsnarf.c	2009-09-15 00:11:20.268218563 +0300
@@ -178,7 +178,7 @@
 	if (smtp->state != SMTP_DATA) {
 		while ((i = buf_index(&buf, "\r\n", 2)) >= 0) {
 			line = buf_tok(&buf, NULL, i + 2);
-			line->base[line->end] = '\0';
+			line->base[line->end-1] = '\0';
 			p = buf_ptr(line);
 			
 			if (strncasecmp(p, "RSET", 4) == 0) {
